function Map() {
    this._data = new Object();
    this.length = 0;
}

Map.prototype = {
has : function( key) {
    return ( key in this._data);
},

put : function( key, value) {
    if ( !this.has( key))
        ++this.length;
    this._data[key] = value;
},

get : function( key) {
    if ( this.has( key))
        return this._data[key];
    else
        return null;
},

erase : function( key) {
    if ( delete this._data[key])
        --this.length;
},

keys : function() {
    var keys = new Array( this.length);
    for ( var k in this._data)
        keys.push( k)
    return keys;
},

values : function() {
    var values = new Array( this.length);
    for ( var k in this._data)
        values.push( this._data[values]);
    return values;
},

}